﻿#ifndef LOADINGWIDGET_H
#define LOADINGWIDGET_H

#include <QWidget>
#include <QMap>
QT_FORWARD_DECLARE_CLASS(QLabel)
QT_FORWARD_DECLARE_CLASS(QMovie)
QT_FORWARD_DECLARE_CLASS(QVBoxLayout)

class LoadingWidget : public QWidget
{
    Q_OBJECT
    enum LoadingWidgetButton{
        ok = 0,
        cancel = 1,
    };
public:
    explicit LoadingWidget(QWidget *parent = 0 ,QString filename = "" );
    ~LoadingWidget();

    void setButton(LoadingWidgetButton btnType);
    void setData(QMap<int,bool> map);
    void insertData(int,bool);

protected:
    void mouseReleaseEvent(QMouseEvent *);
signals:
    void onClicked();
public slots:
    void play();
    void stop();

private:
    QVBoxLayout *vboxMain;
    QLabel *lablGif;
    QMovie *m_movie;
    QMap<int,bool> m_map;

};

#endif // LOADINGWIDGET_H
